﻿using System;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using Microsoft.SqlServer.Server;

public partial class UserDefinedFunctions
{
    [Microsoft.SqlServer.Server.SqlFunction]
    public static SqlString Text_FixPersian(SqlString toFix)
    {
        // Put your code here
        if (toFix.IsNull)
            return SqlString.Null;
        else
            return new SqlString(toFix.Value.Replace("ي", "ی").Replace("ك", "ک"));
    }
};

